-
Notifications
You must be signed in to change notification settings - Fork 77
Add 'temporal', 'spatial_dim' and 'geo_scale' attributes to Covmodel #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@LSchueler would it make sense to you to move the For non latlon fields, I would keep |
|
@LSchueler Maybe |
|
@LSchueler I like the |
|
@LSchueler all fixes implemented. I would also vote against the CF conventions and maybe have that with #140 |
|
@LSchueler Only question I still have is, if For example if you want a model with 3 spatial dimensions and a time dimension, which option looks better to you: model = gs.Gaussian(dim=3, temporal=True)or model = gs.Gaussian(dim=4, temporal=True)In both cases |
|
I added model = gs.Gaussian(temporal=True, spatial_dim=3)
model.dim == 4
model.spatial_dim == 3This is equal to: model = gs.Gaussian(temporal=True, dim=4) |
LSchueler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I think you are nearly there.
LSchueler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-D Wow, my review wasn't very thorough, was it?
LGTM!
Closes #223, #282
This PR adds a boolean
temporalandspatial_dimattribute to the CovModel class as well asgeo_scaleto CovModel and vario_estimate.Setting
temporal=Trueindicates that the model should be seen as a metric spatio-temporal model. This was possible before by increasing the model dimension by one but this feature basically enables using spatio-temporal model with latlon coordinates.spatial_dimwas added so the spatial dimension could be set explicitly and not implicitly by increasing onlydimby 1.Also a
geo_scaleattribute was added to be able to get meaningful length-scales and bins for latlon models. Before we always used therescaleattribute to do that, but that was rather a hack. Now both can be used to set the sphere radius and to rescale the length-scale. In addition to that I addedKM_SCALE,DEGREE_SCALEandRADIAN_SCALEconstant that can be used as radius to get a length-scale in km, degree or radian as some people expect the length-scale to be in degree when working latlon coordinates.Another dimension indicator attribute was added to the CovModel class:
spatial_dim: The truly spatial dimension of the model (2 for latlon, otherwisedimordim-1(iftemporal=True))dim: the internal model dimension (4 forlatlon=Trueandtemporal=Truefor example)field_dim: this is the parametric dimension of the generated field (3 forlatlon=Trueandtemporal=True, 2 forlatlon=Trueandtemporal=Falsefor example)Works like this: